@extends('Admin.layout.layout')

        @section('content')
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header">分类修改</h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>
            <!-- /.row -->
     <div class="col-lg-6 col-lg-offset-3">
	 <form role="form" action="{{url('/admin/cate/insert')}}" method="post">

	    <div class="form-group">

	        <label>选择分类</label>
				 <select class="form-control" name="pid">
			        <option value="0">顶级分类</option>
					@foreach($cates as $k => $v)
					@if($v -> id == $cate->pid)
					<option value="{{$v->id}}" selected>{{$v->name}}</option>

					@else
					<option value="{{$v->id}}">{{$v->name}}</option>
					@endif
					@endforeach
			    </select>
			
	        <input class="form-control" type="text" name="name" placeholder="请输入分类名" value="{{$cate -> name}}">
	        <!-- <p class="help-block">请输入分类名</p> -->
	    </div>
	    {{csrf_field()}}	 
	    <center>
	    <button type="submit" class="btn btn-primary">修改分类</button>
	    </center>
	</form>  
	</div>
        @endsection
